<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>验证码登录验证</title>
        <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
        <link rel="stylesheet" href="https://unpkg.com/mobi.css/dist/mobi.min.css">
    </head>
    <body>
        <div class="flex-center">
            <div class="container">
            <div class="flex-center">
            <div class="unit-1-2 unit-1-on-mobile">
                <h1>MyDjango登录验证</h1>
                    {% if tips %}
                <div>{{ tips }}</div>
                    {% endif %}
                <form class="form" action="" method="post">
                    {% csrf_token %}
                    <div>用户名:{{ form.username }}</div>
                    <div>密 码:{{ form.password }}</div>
                    <div>验证码:{{ form.captcha }}</div>

{#                    <div>验证码:#}
{#   验证码图片显示区域 <img src="/captcha/image/d01bcad5a68f642d426f6cf005f00c5f64fd7bf3/" alt="captcha" class="captcha" /> #}
{#  <input id="id_captcha_0" name="captcha_0" type="hidden" value="d01bcad5a68f642d426f6cf005f00c5f64fd7bf3" />#}

{# 验证码输入框 <input autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false" id="id_captcha_1" name="captcha_1" type="text" />#}
{#</div>#}

                    <button type="submit" class="btn btn-primary btn-block">确定</button>
                </form>
            </div>
            </div>
            </div>
        </div>
    <script>
        $(function () {
            {# ajax 刷新验证码，这个是通过项目的url来配置的 #}
            $(".captcha").click(){

            }
            
        })
    </script>
    </body>
</html>